    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" id="mainFrame">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Expires" content="0">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-control" content="no-cache">
        <meta http-equiv="Cache" content="no-cache">
        <title>样式管理系统</title>

        <!--   <link rel="icon" href="/favicon.ico" type="image/x-icon" />
           <link rel="shortcut icon" href="/favicon.ico" />
           <link rel="bookmark" href="/favicon.ico" />-->
        <link href="../res/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <link href="../res/color-picker/color-picker.min.css" rel="stylesheet" type="text/css" />
        <!--    <link href="https://lib.baomitu.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">-->
             <link href="../res/fontawesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <link href="css/main.css" rel="stylesheet" type="text/css" />
        <link href="css/angular.css" rel="stylesheet">
    </head>
    <body ng-app="angularApp"  ng-controller="mainController" ng-cloak>
            <!--头部begin-->
            <div class="header box-shadow clearfix">
                <a href="javaScript:void(0)" ng-click="selectMenu(curMenu)"  style="height: 60px;width: 200px;padding: 0; line-height: 60px; font-size: 22px; text-align: center; color: #009688;background-color: #1c2b36; float: left;">
                    样式管理系统
                </a>
                <a class="parkSelect"  role="button" ng-click="toggleCollapse()" >
                    <i class="glyphicon glyphicon-menu-hamburger"  style="font-size: 24px;line-height:60px;margin-right:5px"></i>
                </a>
               <!-- <div style="width: 250px;margin-left:15px;line-height: 60px;float: left;">
                   ng-class="{'not-valid':!$root.scene.id}"
                    <tree-selector  node-list="filteredSceneTree" host="$root.scene" host-key="'id'" host-text="'sceneName'"  tip-text="'场景选择'"></tree-selector>
                </div>-->

                <div class="parkSelect" >
                    <button class="btn btn-primary mr15" ng-if="$root.hasPower('导入样式')" ng-click="uploadXml()" >导入样式</button>
                    <div class="btn-group " role="group" mr15>
                        <button class="btn btn-success" ng-if="$root.hasPower('查看场景')"  ng-class="{active:curPage=='sceneTree'}" ng-click="go({ folder: 'scene', page: 'sceneTree'})" >场景管理</button>
                        <button class="btn btn-success " ng-if="$root.hasPower('查看样式分类')" ng-class="{active:curPage=='styleType'}" ng-click="go({ folder: 'styleType', page: 'styleType'})">分类管理</button>
                        <button class="btn btn-success " ng-if="$root.hasPower('查看图标')" ng-class="{active:curPage=='icon'}" ng-click="go({ folder: 'icon', page: 'icon'})">图标管理</button>
                        <button class="btn btn-success " ng-if="$root.hasPower('查看附件')" ng-class="{active:curPage=='attachment'}" ng-click="go({ folder: 'attachment', page: 'attachment'})">附件管理</button>
                    </div>
                    <button class="btn btn-info " ng-if="$root.hasPower('查看发布')" ng-class="{active:curPage=='release'}"  ng-click="go({ folder: 'release', page: 'release'})">发布管理</button>
                    <div class="btn-group " role="group" mr15>
                        <button class="btn btn-warning" ng-if="$root.hasPower('用户')" ng-class="{active:curPage=='user'}" ng-click="go({ folder: 'sys', page: 'user'})">用户</button>
                        <button class="btn btn-warning" ng-if="$root.hasPower('查看日志')" ng-class="{active:curPage=='operation'}" ng-click="go({ folder: 'sys', page: 'operation'})">操作日志</button>
                    </div>
			    </div>
                <div class="pull-right account" uib-dropdown auto-close="always">
                    <a href="#" uib-dropdown-toggle>
                        <span class="thumb-sm avatar pull-right">
                        <img onerror="javascript:this.src='images/userIcon.png';" style="height: 40px" ng-src="{{processImgUrl(user.userIcon,40)}}"/>
						<i class="on md b-white bottom"></i>
					  </span> {{user.name}} <b class="caret"></b></a>
                    <ul class="dropdown-menu" uib-dropdown-menu role="menu">
                        <!--  暂时注释掉对登录账号的操作功能，等合并后直接拉物业的代码 -->
                        <li role="menuitem"><a href="javascript:;;" ng-click="showinfo(user)">个人信息</a></li>
                        <li role="menuitem"><a href="javascript:;;" ng-click="changePwd(user)">修改密码</a></li>
                        <li class="divider"></li>
                        <li role="menuitem"><a href="javascript:;" ng-click="logout()"><i class="fa fa-sign-out pull-right"></i>退出</a></li>
                    </ul>
                </div>
            </div>
            <!--头部end-->
            <div style="display: table ;   padding-top: 60px;width: 100%;height: 100%">
                <div style="display: table-row">
                    <div style="display: table-cell;vertical-align:top;" class=" bg-black" ng-class="{'leftDiv_collapse':menuConfig.collapse,'leftDiv':!menuConfig.collapse}" id="menuDiv">
                        <p class="text-center"
                           ng-style="{width:(!menuConfig.collapse)?'200px':'',height:curModule?'30px':'0px'}"
                           style="background-color: #53cebe;color: #1a2e4e;font-size: 16px;line-height: 30px;margin-bottom: 0;">{{curModule.name}}</p>
                        <tree-menu class="topMenu"  node-list="menus" config="menuConfig" ></tree-menu>
                    </div>
                    <!--ng-style="{'padding-left':menuConfig.collapse?'63px':'250px'}"-->
                    <div style="display: table-cell;position: relative;/*background: #F7F7F7;*/background:white;"  >
                        <div ui-view class="view_body" id="routeBody" > </div>
                    </div>
                </div>
            </div>
            <div class="photoDiv" ng-if="curPic.on">
                <img src="images/refuse.png" class="hand" id="closePopPhoto" style="top:0;right:0;position:absolute" ng-click="curPic.on = false"></img>
                <img class="photo" ng-src="{{curPic.url}}" image-load="wheel()"></img>
            </div>
            <div style="position: fixed;  bottom: 50px;  right: 0;z-index: 10">
                <div uib-alert ng-repeat="alert in alerts" ng-class="'alert-' + (alert.style || 'warning')" close="closeAlert($index)" dismiss-on-timeout="10000" style="min-width:450px;">{{alert.msg}}</div>
            </div>
       <!-- <div class="view_body hide" id="ajaxBody"></div>-->
    </body>
    <script type="text/javascript" src="../res/jquery.min.js"></script>
    <script type="text/javascript" src="../res/layer/layer.js"></script>
    <script type="text/javascript" src="../res/datepicker97/WdatePicker.js"></script>
    <script type="text/javascript" src="../res/ajaxfileupload.js"></script>
    <script type="text/javascript" src="../res/angular1.5.11/angular.min.js"></script>
    <script type="text/javascript" src="../res/angular1.5.11/angular-cookies.min.js"></script>
    <script type="text/javascript" src="../res/angular1.5.11/angular-locale_zh-cn.js"></script>
    <script type="text/javascript" src="../res/angular1.5.11/ui-bootstrap-tpls.js"></script>
    <script type="text/javascript" src="../res/angular1.5.11/angular-ui-router.min.js"></script>
    <script type="text/javascript" src="../res/angular1.5.11/ocLazyLoad.min.js"></script>
    <script type="text/javascript" src="../res/color-picker/color-picker.min.js"></script>
    <script type="text/javascript" src="../res/me-lazyload.js"></script>
    <script type="text/javascript" src="../res/angular1.5.11/clickoutside.directive.js"></script>
    <script type="text/javascript" src="../res/wheelzoom-feng.js"></script>

    <script>
        var app = angular.module("angularApp", [ 'ui.router', 'ui.bootstrap','ngCookies',
                                                'oc.lazyLoad', 'angular-click-outside','ui.colorpicker','me-lazyload'
                                                ]);
    </script>
    <script type="text/javascript" src="js/filter.js"></script>
    <script type="text/javascript" src="js/router.config.js"></script>
    <script type="text/javascript" src="mainController.js"></script>

    <script type="text/ng-template" id="tdCheckOne.html">
        <i role="button" ng-click="checkOne(item)" ng-class="{'glyphicon-check':item.checked,'glyphicon-unchecked':!item.checked}" class="glyphicon"></i>
    </script>
    <script type="text/ng-template" id="thCheckAll.html">
             <span role="button" ng-click="checkAll(items)">
            <i class="glyphicon" ng-class="{'glyphicon-check':allChecked(items),'glyphicon-unchecked':!allChecked(items)}"></i></span>
    </script>

    <script type="text/ng-template" id="colorTrans.html">
        <i ng-show="color.color" class="color-block" ng-style="{'background-color':(color.color+color.transparent)}"></i><span>{{color.name}}</span>
    </script>
    <script type="text/ng-template" id="colorEdit.html">
        <span style="cursor: pointer;display:inline-block;"  color-picker default-color="#ffffff">
            <span  class="color-block" ng-style="{'background-color': host[key]}"></span>
            <span class="fa fa-edit"  style="font-size:18px;vertical-align: text-bottom" ></span>
        </span>
        <input class="form-control" style="width:100px;display: inline-block" type="text" ng-model="host[key]" ng-pattern="/^#[0123456789abcdef]{6}$/i" ng-required="need" />
    </script>
    <script type="text/ng-template" id="customTemplate.html">
        <a>
            <i ng-show="match.model.color" class="color-block" ng-style="{'background-color':(match.model.color+match.model.transparent)}"></i>
            <span ng-bind-html="match.label | uibTypeaheadHighlight:query"></span>
        </a>
    </script>

    <script type="text/ng-template" id="colorSelector.html">
        <span ><!--| limitTo:10-->
            <i ng-if="obj" class="color-block" ng-style="{'background-color':(obj.color+obj.transparent)}"></i>
            <span style="display: inline-block">
                 <input type="text" ng-model="obj" placeholder="--选择颜色--" style="width: 85px;padding:6px 3px"
                        uib-typeahead="dict as dict.name for dict in dictColorList | filter:{name:$viewValue}  "
                        class="form-control" typeahead-template-url="customTemplate.html" typeahead-on-select="selectColor($item)"
                        typeahead-show-hint="true" typeahead-min-length="0">
            </span>
        </span>
    </script>
    <script type="text/ng-template" id="iconDiv.html">
        <div >
            <img style="max-width:48px " ng-click="showPhoto()"></img> <span >{{lazySrc}}</span> </div>
    </script>
    <script type="text/ng-template" id="iconEdit.html">
        <div>
            <span ng-click="showPhoto(url)">
                <img ng-src="{{processImgUrl(url,'min')}}" style="max-width:48px "></img>
            </span>
            <span class="fa fa-edit"  style="cursor: pointer;font-size:18px;vertical-align: text-bottom" ng-click="selectIcon()"></span>
            <input class="form-control" style="width:150px;display: inline-block" type="text" ng-model="host[key]" >
            <!--ng-pattern="/^[^\/]+\/{1}[^\/]+$/i"/-->
        </div>
    </script>

    <script type="text/ng-template" id="groupEdit.html">
        <span style="position: relative">
            <span popover-class="popoverMax" popover-is-open="styleType.popover == field && styleType.curStyleTypeId == host.id"
                  popover-trigger="'none'" ng-class="{'btn-link':$root.hasChecked(styleType.ruleList)}"
                  ng-click="showGroupEdit()"
                  uib-popover-template="'view/instance/rule_group_edit.html'"
                  ><span ng-transclude></span></span>
            </span>
    </script>

    <script type="text/ng-template" id="instanceStyleEdit.html">
        <span style="position: relative">
            <span popover-class="popoverMax" popover-is-open="styleType.popover == field  && styleType.curStyleTypeId == host.id"
                  popover-trigger="'none'"
                  ng-click="showGroupEdit()"
                  uib-popover-template="'view/instance/rule_group_edit.html'"
            ><span ng-transclude></span></span>
            </span>
    </script>

    <!--<script type="text/ng-template" id="customTemplate.html">
  <a>
      <img ng-src="http://upload.wikimedia.org/wikipedia/commons/thumb/{{match.model.flag}}" width="16">
      <span ng-bind-html="match.label | uibTypeaheadHighlight:query"></span>
  </a>
</script>-->
</html>
